function Person () {
  this.name = "jinge"
  this.friend = ["wendin"]
}

function Child (number) {
  this.number = number
}

Child.prototype = new Person()

const child1 = new Child(12)
const child2 = new Child(13)

child2.friend.push('jjj')
child2.name = "jjj"
console.log(child1.name);
console.log(child2.friend);
console.log(child1);
console.log(child2);

//1.引用类型的属性将被所有实例共享,简单类型会直接添加到child2对象上
//2.打印时无法看到原型上的数据